import loadable from '@loadable/component';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';

const Login = loadable(() => import('./pages/Login'));
const Admin = loadable(() => import('./pages/Admin'));

const App = () => {

  return (
    <>
      <Router>
        <Routes>
          <Route path="/" element={<Login />} />
          <Route path="/login" element={<Login />} />
          <Route path="/admin" element={<Admin />} />
          {/* 更多路由 */}
        </Routes>
      </Router>
    </>
  );
};

export default App;